package com.score.pojo;

import lombok.Data;

@Data
public class ReturnEntry {
    private int code;
    private Object data2;
    private Object data;
    private Object data3 = null;
    private String message = "";

    public ReturnEntry(int code, Object data2, Object data,String message) {
        this.code = code;
        this.data2 = data2;
        this.data = data;
        this.message = message;
    }
    public ReturnEntry(int code, Object data2, Object data) {
        this.code = code;
        this.data2 = data2;
        this.data = data;
    }

    public ReturnEntry() {
    }

    public ReturnEntry(int code, Object data2, Object data, Object data3) {
        this.code = code;
        this.data2 = data2;
        this.data = data;
        this.data3 = data3;
    }
    public ReturnEntry(int code, Object data2, Object data, Object data3,String message) {
        this.code = code;
        this.data2 = data2;
        this.data = data;
        this.data3 = data3;
        this.message = message;
    }

    public ReturnEntry ok(Object data2, Object data,String message){
        return new ReturnEntry(200,data2,data,message);
    }
    public ReturnEntry ok(Object data2, Object data){
        return new ReturnEntry(200,data2,data);
    }
    public ReturnEntry ok(Object data2, Object data, Object data3,String message){
        return new ReturnEntry(200,data2,data,data3,message);
    }
    public ReturnEntry ok(Object data2, Object data, Object data3){
        return new ReturnEntry(200,data2,data,data3);
    }
    public ReturnEntry fail(Object data2, Object data){
        return new ReturnEntry(404,data2,data);
    }
}
